home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 June: Reference Library / Dev.CD Jun 94.toast / Technical Documentation / Inside Macintosh / IM—Text / IM—Text.rsrc / TOC#_1000 < prev   
Encoding:
Text File  |  1994-04-27  |  35.0 KB  |  19 lines

  1. ÓTextContentsFigures, Tables, and ListingsAbout This Book What to ReadFormat of a Typical ChapterConventions Used in This Book
  2. Special FontsTypes of NotesDevelopment EnvironmentDeveloper Products and Support&Introduction to 
  3. Text on the MacintoshMacintosh Text OverviewSeparation of TasksOFigure 1-1    Separation of input, storage, and display in Macintosh text handlingText Is Graphics#Figure 1-2    How QuickDraw draws text.Characters, Glyphs, Character Codes, and Bytes9Figure 1-3    Bytes, character codes, characters, and glyphs:Figure 1-4    Four bytes displayed in Japanese and in English Text Storage*Figure 1-5    Storage order and display orderFigure 1-6    Style runs in textKeyboards and Input Methods'Figure 1-7    Key translation (simplified)NFigure 1-8    Key Caps display of Thai keyboard layout (no modifier keys pressed)OFigure 1-9    Key Caps display of Cyrillic keyboard layout (Caps Lock key pressed)"Writing Systems and Script SystemsMacintosh Text Utilities#TextEdit, a Text-Processing ServiceNFigure 1-10    TextEdit edits and displays mixed-directional text in a dialog box(Planning Your Text Handling CapabilitiesRudimentary Text HandlingModerate Text HandlingSophisticated Text Handling"Writing Systems and Script Systems'Features of the World’s Writing Systems#Figure 1-11    Writing-system examplesCharacter RepresentationGFigure 1-12    Words with alphabetic, syllabic, and ideographic characters"Figure 1-13    Thai character clusterLine Direction and Alignment#Figure 1-14    Line directions in textFigure 1-15    Text alignmentZFigure 1-16    Justification through interword (Hebrew) and intercharacter (Japanese) spacing>Figure 1-17    Justification with Arabic extension bar characters)Contextual Forms and Character Reordering/Figure 1-18    Contextual forms in cursive English5Figure 1-19    Standalone and contextual forms in Arabic$Figure 1-20    A ligature in Roman text%Figure 1-21    A ligature in Arabic text-Figure 1-22    A complex ligature in Arabic textAFigure 1-23    Character reordering in the Devanagari writing systemDiacritical MarksVFigure 1-24    Arabic text with diacritical mark to specify extra emphasis on a consonant&Figure 1-25    Vowel marks in Hebrew text"Uppercase and Lowercase CharactersWord Demarcation8Figure 1-26    Word demarcation in the Roman writing system;Figure 1-27    Line breaking in a bidirectional writing system(Figure 1-28    Word demarcation in JapaneseStyles<Figure 1-29    Selected valid styles in various writing systemsNumbers, Currencies, and Dates*Figure 1-30    Standard international formats Character Order and Text Sorting&Variations Among Languages and Regions4Components of the Macintosh Script Management SystemGFigure 1-31    Components of the script management system for text displayThe Macintosh Text ManagersThe WorldScript ExtensionsComponents of a Script SystemInternational Resources&The international resources(continued)Keyboard Resources!The keyboard resources(continued)Fonts!How Script Systems Are ClassifiedTypes of Script Systems#Figure 1-32    Types of script systemsOFigure 1-33    How the script management system handles different types of scripts.Script Codes, Language Codes, and Region Codes6Figure 1-34    The script, language, and region hierarchyOFigure 1-35    Distinguishing scripts by resource ID range (for script codes 0–32)'The System Script and Auxiliary ScriptsFont Script and Keyboard ScriptHow Script Systems WorkCharacter Encoding The Standard Roman Character Set,Figure 1-36    The Standard Roman character set Other 1-Byte Character Encodings9Figure 1-37    Character encodings for 1-byte script systems2-Byte Character EncodingsDFigure 1-38    Character encoding for a 2-byte script system (Japanese)GFigure 1-39    Constructing blocks (Hangul) from elements (Jamo) in Korean
  4. Font HandlingFont Availability and Selection System Font and Application Font%Roman Characters and Associated FontsOther Font Issues$Character Rendering and Text DisplayStorage Order and Display Order+Figure 1-40    Storage order and display orderLine Direction and Alignment<Figure 1-41    How primary line direction affects display order9Figure 1-42    Dialog items truncated at dialog-box boundary2Style Runs, Font Runs, Script Runs, Direction RunsJFigure 1-43    Style runs, font runs, script runs, and direction runs in text Text LayoutCaret Handling.Figure 1-44    Caret position and insertion point2Figure 1-45    Caret positions at direction bondariesHFigure 1-46    Dual caret at direction boundaries in mixed-directional textKFigure 1-47    Single carets at direction boundaries in mixed-directional text HighlightingAFigure 1-48    Highlighting a selection range in unidirectional textDFigure 1-49    Highlighting a selection range in mixed-directional text)Converting Screen Position to Text Offset?Figure 1-50    Interpreting caret position from a mouse-down eventLFigure 1-51    Mouse-down regions and caret positions in mixed-directional textPrinting
  5. Text InputKeyboards and Key Translation/Figure 1-52    Apple Keyboard II (domestic layout)Figure 1-53    Key translation;Figure 1-54    Font script and keyboard script synchronization
  6. Input Methods=Figure 1-55    Bottomline input window for Japanese input method;Figure 1-56    Active input area (underlined) for inline input&Figure 1-57    Bottomline input in KoreanText ManipulationSorting Strings-Formatting Dates, Times, Numbers, and SymbolsQFigure 1-58    Filenames and dates in Arabic and U.S. formats (Arabic system script)Analyzing Characters)Searching, Modifying, and Converting Text'Finding Word Boundaries and Line BreaksScript Systems in Use&Installing and Enabling Script SystemsComponents of the System Script9Figure 1-59    System-script components in the System FolderComponents of Auxiliary Scripts+Installing Modifications to a Script System*How the User Switches Among Script Systems'Figure 1-60    Menu bar with keyboard icon1Figure 1-61    Keyboard icons and input-method iconsFigure 1-62    Keyboard menuFigure 1-63    Arabic Key CapsUser Control of Script SettingsFigure 1-64    Text control panel!Figure 1-65    Numbers control panel%Figure 1-66    Date & Time control panelDFigure 1-67    Date Formats dialog box (from Date & Time control panel)DFigure 1-68    Time Formats dialog box (from Date & Time control panel)TextEditAbout TextEdit(TextEdit and Standard Macintosh FeaturesMultistyled and Monostyled Text'Figure 2-1    Style runs in a line of text)Figure 2-2    Mixed-directional text display(Font and Keyboard Script Synchronization"Cutting, Copying, and Pasting TextThe TextEdit User InterfaceFThe Selection Range, the Insertion Point, and Highlighting in TextEdit-Figure 2-3    Discontinuous highlighting displayBFigure 2-4    Outline highlighted text selection in background windowCaret Position and Movement5Figure 2-5    Caret movement across a direction boundaryText AlignmentLine MeasurementText Buffering,The TextEdit Private, Null, and Style Scraps+An Overview of the TextEdit Data StructuresAn Overview of the Edit Record*Figure 2-6    Destination and view rectanglesRelated Data StructuresPFigure 2-7    Relationship between the TextEdit data structures for monostyled textPFigure 2-8    Relationships among the TextEdit data structures for multistyled textUsing TextEditGetting Started With TextEditPreparing to Use TextEditDisplaying Static Text/Listing 2-1    Using TETextBox to draw static textCreating an Edit Record$Listing 2-2    A sample document record.Listing 2-3    Creating a multistyled edit record.Specifying the Destination and View Rectangles"Setting the Text of an Edit Record2Setting the Selection Range or the Insertion PointScrolling TextDisposing of an Edit Record#Responding to Events Using TextEditHandling a Null Event(Listing 2-4    An idle-processing procedureActivating an Edit RecordHandling Mouse-Down Events2Listing 2-5    Passing a mouse-down event to TextEditResponding to an Update Event,Accepting Text Input Through Key-Down Events(Listing 2-6    Inserting text in a document.Listing 2-7    Getting the selection range length&Moving Text In and Out of Edit Records+Using TextEdit to Cut, Copy, and Paste Text6Figure 2-9    Cutting text from a multistyled edit recordBListing 2-8    Handling Cut, Copy, and Paste commands on an Edit menuInserting and Deleting TextText Attributes5Checking the Text Attributes Across a Selection Range8Figure 2-10    Continuous attributes over a selection rangeWListing 2-9    Determining the font, style, size, and color of the current selection rangeToggling an Attribute<Figure 2-11    An initial selection before TESetStyle is called>Figure 2-12    The result of calling TESetStyle to toggle to bold>Figure 2-13    The result of calling TESetStyle to toggle italicsHandling a Font Menu#Listing 2-10    Handling the Font menuHandling a Font Size Menu#Listing 2-11    Handling the Size menuHandling a Style Menu"Listing 2-12    Handling a Style menudListing 2-13    Checking the style and marking Style menu items to reflect 
  7. the current selection rangeChanging the Text Alignment@Saving and Restoring a TextEdit Document, and 
  8. Implementing UndoSaving a TextEdit Document:Listing 2-14    Saving a multistyled text edit record to disk'Restoring an Existing TextEdit Document@Listing 2-15    Restoring a document that uses multistyled TextEdit
  9. Handling Undo<Listing 2-16    Checking for 2-byte characters when backspacingCustomizing TextEdit!Replacing the End-of-Line RoutineReplacing the Drawing Routine&Replacing the Width-Measuring Routines<Figure 2-14    Determining when to use WIDTHHook and nWIDTHHookReplacing the Hit Test RoutineCustomizing Word SelectionCustomizing Automatic ScrollingDetermining the Line LengthAdvanced CustomizationTextEdit Reference3Figure 2-15    The TextEdit data structures and fieldsTEInit
  10. TEStyleNewTENew    TEDispose
  11. TEActivate TEDeactivateTEKey    TESetText    TEGetTextTESetStyleHandleTEGetStyleHandleTEIdleTEClick TESetSelectTESetAlignmentTEUpdate    TETextBox    TECalText TEGetHeightTEScroll TEPinScroll
  12. TEAutoView    TESelView$Modifying the Text of an Edit RecordTEDeleteTEInsertTECutTECopyTEPaste TEStylePaste    TEToScrap TEFromScrap
  13. TEScrapHandleTEGetScrapLengthTESetScrapLength
  14. TESetStyleTEReplaceStyleTEContinuousStyle
  15. TEStyleInsertTEGetStyleScrapHandleTEUseStyleScrap TENumStyles TEGetOffset
  16. TEGetPoint
  17. TEFeatureFlag TECustomHookTESetWordBreakTESetClickLoopSummary of TextEditQuickDraw TextAbout QuickDraw TextGraphics Ports and Text DrawingFont, Font Style, and Font SizeFigure 3-1    Stylistic variationsTransfer ModesHFigure 3-2    Effect of the basic transfer modes for black-and-white images2QuickDraw Text, Script Systems, and Other Managers/Figure 3-3    Multiple style runs on a single line!Text Formatting and Justification&Figure 3-4    Justification of Roman textScalingCarets and HighlightingUsing QuickDraw TextPreparing to Use QuickDraw2Determining the Version and Initializing QuickDraw'Setting Up the Text-Drawing EnvironmentSpecifying Text CharacteristicsHListing 3-1    Using QuickDraw to set the graphics port text-related fieldsSetting the FontModifying the Text StyleChanging the Font Size Changing the Width of CharactersUsing Fractional Glyph WidthsSpecifying the Transfer ModeBasic Transfer Mode Operations#Arithmetic Transfer Mode OperationsThe grayishTextOr Transfer ModeText Mask ModeTransparent Transfer Mode!Transfer Modes and Multibit Fonts-Measuring and Drawing Single Segments of TextIndividual GlyphsPascal StringsText Segments #Measuring and Drawing Lines of Text#Determining Where to Break the LineLListing 3-2    Calling StyledLineBreak to identify where to break the text line,Determining the Display Order for Style RunsRListing 3-3    An application-defined run direction function called by GetFormatOrderHListing 3-4    Determining the style run display order and drawing the line0Eliminating Trailing Spaces (for Justified Text)6Figure 3-5    Calling VisibleLength for a Roman style run7Figure 3-6    Calling VisibleLength for a Hebrew style runLFigure 3-7    Calling VisibleLength for Hebrew text with Roman space characters/Calculating the Slop Value (for Justified Text):Allocating the Slop to Each Style Run (for Justified Text)4Listing 3-5    Distributing slop value among style runsDrawing the Line of Text<Listing 3-6    Calling GetFontInfo to determine the line heightUsing Scaled TextfListing 3-7    Turning off reordering of right-to-left text before calling PixelToChar 
  18. for line-breakingcListing 3-8    Using StdTxMeas to get the font metrics for determining the line height 
  19. of scaled textDrawing Carets and HighlightingDFigure 3-8    What pixel position means for CharToPixel and PixelToChar6Converting an Onscreen Pixel Location to a Byte Offset,Finding a Caret Position and Drawing a Caret=Figure 3-9    Caret position for a leading-edge mouse-down event?Figure 3-10    Caret position for a trailing-edge mouse-down eventVFigure 3-11    Caret position for a leading-edge mouse-down event at a direction boundaryWFigure 3-12    Caret position for a trailing-edge mouse-down event at a direction boundaryWFigure 3-13    Caret position for a trailing-edge mouse-down event at a direction boundary[Figure 3-14    Caret position for a mouse-down event beyond the last glyph of the text segment@Listing 3-9    Drawing the caret and highlighting a selection range0Synchronizing the Caret With the Keyboard ScriptHighlighting a Text Selection/Figure 3-15    Highlighting mixed-directional text%Customizing QuickDraw’s Text HandlingText in QuickDraw PicturesFonts<Listing 3-10    Generating a picture file with font information1Listing 3-11    A picture file with font informationText With Multiple Style RunsQuickDraw Text ReferenceTextFontTextFaceTextMode#Effects of the basic transfer modes/Table 3-2    Transfer mode constants and selectorsTextSize
  20. SpaceExtra    CharExtra GetFontInfoDrawChar
  21. DrawStringDrawText
  22. DrawJustified    CharWidth StringWidth    TextWidth MeasureTextMeasureJustifiedGetFormatOrder
  23. VisibleLength PortionLine PixelToChar CharToPixel
  24. HiliteTextStdText    StdTxMeas MyRlDirProcSummary of QuickDraw Text Font Manager About Fonts'Characters, Character Codes, and GlyphsKinds of FontsIdentifying FontsFont Measurements&Figure 4-1    Terms for font measurements.Figure 4-2    The ascent line and maximum y-value7Figure 4-3    Unkerned text (top) and kerned text (bottom)About Font ResourcesFont Resource Types$A Brief History of Font Resource UseFont Family IDs%Subdivisions of Roman font family IDs+Restrictions on the Use of 'FONT' ResourcesFont Resource TablesAbout the Font ManagerHow QuickDraw Requests a Font/How the Font Manager Responds to a Font Request!How the Font Manager Scales Fonts=Figure 4-4    A comparison of scaled bitmapped and outline fonts)Figure 4-5    A glyph stretched horizontally'Figure 4-6    A glyph stretched vertically)Figure 4-7    A glyph condensed horizontally(The Scaling Process for a Bitmapped Font'The Scaling Process for an Outline Font,How the Font Manager Calculates Glyph WidthsSynthetic Fonts*How the Font Manager Renders Outline Fonts@Figure 4-8    The effect of an off-curve point on two Bézier curves6Figure 4-9    An outline with points on and off the curve5Figure 4-10    A curve with consecutive off-curve points(Figure 4-11    A glyph from an outline fontJFigure 4-12    An unmodified glyph from an outline font at a small point size4Figure 4-13    An instructed glyph from an outline fontUsing the Font Manager'Adding Font Sizes and Names to the Menu7Figure 4-14    A sample Size menu and font size dialog box!Storing a Font Name in a Document=Listing 4-1    Checking a font name against the system font name$Getting Font Measurement Information#Favoring Outline or Bitmapped FontsPreserving the Shapes of GlyphsGFigure 4-15    The difference between a scaled glyph and a preserved glyphUsing Width Tables)Getting the System or Application Font ID.Using Fractional Glyph Widths and Font ScalingFont Manager Reference    InitFonts GetFontNameGetFNumRealFontGetDefFontSize
  25. GetSysFont
  26. GetAppFont FontMetricsOutlineMetricsSetFractEnableSetFScaleDisableSetOutlinePreferredGetOutlinePreferred    IsOutlineSetPreserveGlyphGetPreserveGlyph
  27. FMSwapFont SetFontLock
  28. FlushFonts0Figure 4-16    The bitmapped font ('NFNT') resourceFigure 4-17    The font directory5Listing 4-2    Calculating the checksum of a given tableFigure 4-18    A glyph description!Figure 4-19    The font header table.Listing 4-3    Calculating the checksum of a font(Figure 4-20    The horizontal metrics tableFigure 4-21    The naming tablePlatform identifiers!ISO platform-specific identifiersISO language codes Font name identifiers(continued)-Figure 4-22    The font family ('FOND') resourceFigure 4-23    Style codes&Figure 4-24    The font association tableFigure 4-25    The offset table"Figure 4-26    The bounding-box table-Figure 4-27    The font family glyph-width table#Figure 4-28    The style-mapping tableIListing 4-4    Using the style-mapping table to build a PostScript font name)Figure 4-29    The font family kerning table Figure 4-30    A kerning pair entrySummary of the Font ManagerText UtilitiesAbout the Text Utilities2The Text Utilities and the International ResourcesObtaining Resource Information)Figure 5-1    Determining the current scriptPascal Strings and Text Strings;Figure 5-2    A string containing 1-byte and 2-byte charactersUsing the Text UtilitiesDefining Strings Working With String Handles6Listing 5-1    Using the NewString and SetString routinesWorking With String Resources&Sorting Strings in Different Languages5Figure 5-3    Strings in different languages in one list:Figure 5-4    Strings in different languages sorted by scriptJFigure 5-5    Strings in different languages sorted by language within script$Sorting Strings in the Same Language#Primary and Secondary Sorting OrderQExcerpt from the Standard Roman script system sorting order(continued)(continued)'Expansion and Contraction of CharactersIgnorable Characters#Converting and Stripping CharactersSpecial Cases for SortingVariations in Sorting BehaviorChoosing a Comparison Routine  /Figure 5-6    Choosing a string comparison routine-Sorting features of the Macintosh file system Testing Two Strings for Equality"Comparing Two Strings for OrderingModifying Text4Converting Characters and Stripping Marks in Strings#Fitting a String Into a Screen Area.Figure 5-7    Truncating a pathname in its middle!Listing 5-2    Truncating a pathnameReplacing a Portion of a StringLFigure 5-8    Replacing a portion of a string with 1-byte and 2-byte characters,Listing 5-3    Substituting and truncating text-Finding Word, Line, and Script Run BoundariesFinding Word BoundariesFinding Line Breaks2Figure 5-9    Finding line breaks in multiscript text>Figure 5-10    Relationships of the parameters of StyledLineBreak.Listing 5-4    Using the StyledLineBreak function&Finding Subscripts Within a Script Run,Figure 5-11    Extracting blocks of Roman text "Working With Date and Time Strings)Variations in time and short date formats:Variations in long and abbreviated date formats(continued)QConverting Formatted Date and Time Strings 
  29. Into Internal Numeric Representations/Listing 5-5    Using StringToDate and StringToTime7StringToDateStatus values and their meanings(continued)#Date and Time Value Representations5Converting Standard Date and Time Values Into StringsWorking With Numeric Strings0Figure 5-12    Using the number formatting routines8FormatResultType values for numeric conversion functions/Converting Between Integers and Numeric Strings;Listing 5-6    Converting a long integer into a numeric string)Using Number Format Specification StringsNumeric string formats/Examples of number format specification strings!Literals in number format stringsFilling digits in+Quoting mechanisms in number format strings+Table 5-12    Symbols in number format stringsUConverting Number Format Specification Strings Into Internal 
  30. Numeric Representations=Converting Between Floating-Point Numbers and Numeric StringsText Utilities ReferenceThe Offset Table RecordThe Date Cache Record&The Number Format Specification RecordThe Triple Integer ArrayThe Script Run Status Record    NewString    SetString    GetString GetIndString EqualStringIdenticalString
  31. IdenticalText"Implicit language codes(continued) ScriptOrder
  32. LanguageOrder StringOrder    TextOrder    RelString
  33. CompareString CompareText UpperString
  34. LowercaseText
  35. UppercaseTextStripDiacriticsUppercaseStripDiacritics TruncString    TruncText ReplaceTextMungerFindWordBreaksStyledLineBreak
  36. FindScriptRun
  37. InitDateCache StringToDate StringToTime
  38. DateString
  39. TimeStringLongDateStringLongTimeString NumToString  StringToNumStringToFormatRecFormatRecToStringStringToExtendedExtendedToStringSummary of Text UtilitiesScript ManagerAbout the Script Manager3The Script Manager and the Script Management System#The Script Manager and ApplicationsEvolution of the Script ManagerEvolution of the Script ManagerUsing the Script Manager1Testing for the Script Manager and Script Systems>Version numbers for the Script Manager and Roman script systemControlling Settings)Checking and Setting the System Direction-Checking and Setting Script Manager VariablesgScript Manager variables accessed through 
  40. GetScriptManagerVariable/SetScriptManagerVariable(continued)AListing 6-1    Specifying a dual caret with SetScriptManagerVariable%Checking and Setting Script VariablesQScript variables accessed through 
  41. GetScriptVariable/SetScriptVariable(continued)IListing 6-2    Representing font names correctly in the script for that font5Listing 6-3    Setting the size of the Balloon Help fontMaking Keyboard SettingsFConstants for the code parameter in the KeyScript procedure(continued)1Synchronizing the Font Script and Keyboard Script<Listing 6-4    Setting the keyboard script from the font script>Listing 6-5    Setting the font (script) from the keyboard scriptObtaining Information.Determining Script Codes From Font Information6Figure 6-1    Determining script code from font family IDAnalyzing Characters<Listing 6-6    Handling 2-byte characters in a search procedure3Figure 6-2    Fields in the CharacterType return value*Directly Accessing International Resources(Using Currency, Number, and Date FormatsDListing 6-7    Determining the number separators for the current scriptUsing Number PartsJListing 6-8    Getting number parts from a script system’s number parts tableRetrieving Text From Tokens9Listing 6-9    Getting a token string from the untoken tableUsing Word-Break TablesUsing Whitespace InformationConverting Text Tokenization%Figure 6-3    The action of IntlTokenize4Figure 6-4    IntlTokenize data structures (simplified)Transliteration)Figure 6-5    The effects of transliterationModifying Script Systems;Replacing a Script System’s Default International Resources,Replacing a Script System’s Default RoutinesJFigure 6-6    Dispatch table entry for script utilities and QuickDraw patchesScript Manager ReferenceFigure 6-7    Style code formatToken Block RecordGetSysDirectionSetSysDirectionGetScriptManagerVariableSetScriptManagerVariableGetScriptVariableSetScriptVariable    KeyScript
  42. FontScript FontToScript
  43. IntlScriptCharacterByteType
  44. CharacterTypeFillParseTableClearIntlResourceCacheGetIntlResourceGetIntlResourceTable IntlTokenizeTransliterateTextGetScriptUtilityAddressSetScriptUtilityAddressGetScriptQDPatchAddressSetScriptQDPatchAddressSummary of the Script ManagerText Services ManagerAbout Text ServicesAbout Input Methods8Figure 7-1    Bottomline input with a floating input windowFigure 7-2    Inline input=Figure 7-3    Displaying conversion options for bottomline inputAbout the Text Services ManagerThe Text Services EnvironmentLFigure 7-4    How a TSM-aware client application uses the Text Services Manager+The Text Services Manager and Input Methods Inline InputLFigure 7-5    Entering, converting, and confirming text in an active input areaFloating Input WindowsIFigure 7-6    How a non-TSM-aware application uses the Text Services ManagerFloating Utility Windows(Figure 7-7    Floating window service layerAbout Text Service ComponentsUFigure 7-8    The format of the componentFlags field of the component description record9Using the Text Services Manager (for Client Applications)9Testing for the Availability of the Text Services Manager!Calling the Text Services Manager'Initializing as a TSM-Aware Application3Listing 7-1    Initializing as a TSM-aware applicationCreating a TSM DocumentHListing 7-2    Creating a new TSM document and associating it with a window*Making Text Services Available to the User*Activating and Deactivating a TSM Document6Listing 7-3    Activating and deactivating a TSM document3Passing Events, Menu Selections, and Cursor Setting6Listing 7-4    Passing events to a text service component,Confirming Active Text Within a TSM Document3Listing 7-5    Confirming text in an active input areaDeleting a TSM Document'Closing Down as a TSM-Aware Application+Listing 7-6    Closing a TSM-aware application1Requesting a Floating Input Window for Text Entry4Associating Input Methods With Scripts and Languages"Handling Text Service Apple Events1Receiving Text and Updating the Active Input AreaIListing 7-7    A sample handler for the Update Active Input Area Apple event)Converting Screen Position to Text OffsetCListing 7-8    A sample handler for the Position To Offset Apple event)Converting Text Offset to Screen PositionQFigure 7-9    Drawing a window with conversion options next to the active input areaCListing 7-9    A sample handler for the Offset To Position Apple event"Showing or Hiding the Input Window(Direct Access to Text Service ComponentsCalling the Component ManagerCalling Text Service Components>Using the Text Services Manager (for Text Service 
  45. Components)Providing Menus and Icons'Providing a Text Service Component Menu2Providing Input Method Icons for the Keyboard Menu@Figure 7-10    Input method icons in the Keyboard menu and menu barResponding to CallsInitiating a Text Service)Activating Text Service Component Windows5Responding to Events and Updating the Cursor and MenuConfirming Active Text InputClosing a Text Service/Identifying the Supported Scripts and LanguagesMListing 7-10    Determining the script and language for a text service component Making Calls+Sending Apple Events to Client ApplicationsMListing 7-11    Constructing and sending an Update Active Input Area Apple event Opening Floating Utility WindowsText Services Manager ReferenceInitTSMAwareApplicationCloseTSMAwareApplicationNewTSMDocumentActivateTSMDocumentDeactivateTSMDocumentDeleteTSMDocumentTSMEvent
  46. TSMMenuSelect SetTSMCursorFixTSMDocumentGetServiceListOpenTextServiceCloseTextServiceUseInputWindowSetDefaultInputMethodGetDefaultInputMethodSetTextServiceLanguageGetTextServiceLanguageApple event ID constants(Apple event keyword constants(continued)Apple event descriptor typesFApple event descriptor type constants for the Apple event region class1Figure 7-11    Updating text in an active input areaSendAEFromTSMComponentNewServiceWindowCloseServiceWindowGetFrontServiceWindowFindServiceWindowInitiateTextServiceActivateTextServiceDeactivateTextServiceHidePaletteWindowsTerminateTextServiceTextServiceEventTextServiceMenuSelectSetTextServiceCursorGetTextServiceMenuFixTextServiceGetScriptLanguageSupport$Summary of the Text Services ManagerDictionary Manager$About Dictionaries for Input MethodsAbout the Dictionary ManagerThe Structure of a Dictionary0Figure 8-1    General format of a dictionary record/Figure 8-2    Format of data associated with a key?Figure 8-3    Format of an entry in the data associated with a key Garbage Data3Figure 8-4    A simple dictionary with no garbage data0Figure 8-5    Creating garbage data in a dictionary2Figure 8-6    Deleting garbage data from a dictionaryDictionary Manager LimitationsUsing the Dictionary Manager2Testing for the Presence of the Dictionary ManagerMaking a DictionaryCreating the File&Listing 8-1    Creating a dictionary fileConstructing the DictionaryAccessing a Dictionary"Opening and Closing the Dictionary1Listing 8-2    Opening and closing a dictionary file*Obtaining Information About the Dictionary4Listing 8-3    Obtaining information about a dictionary Locating Records in a DictionaryLocating Records by Key)Figure 8-7    The requested attributes table9Sample data returned by FindRecordInDictionary(continued)Locating Records by Index;Listing 8-4    Displaying all records in a dictionary by indexModifying a Dictionary0Listing 8-5    Inserting a record into a dictionaryCompacting a DictionaryDictionary Manager ReferenceInitializeDictionaryOpenDictionaryCloseDictionaryGetDictionaryInformationFindRecordInDictionary.Defined attribute types for dictionary entriesFindRecordByIndexInDictionaryInsertRecordToDictionaryDeleteRecordFromDictionaryCompactDictionary!Summary of the Dictionary Manager
  47. AppendixesBuilt-in Script SupportThe Roman Script System The Standard Roman Character Set+Figure A-1    The Standard Roman character setNonprinting CharactersENonprinting characters in the Standard Roman character set(continued)6Low-ASCII characters to avoid as delimiters(continued)Printing CharactersBPrinting characters in the Standard Roman character set(continued)Variations in the Character SetDCroatian variations from the Standard Roman character set(continued)9Romanian variations from the Standard Roman character set8Turkish variations from the Standard Roman character setFIcelandic and Faroese variations from the Standard Roman character set*The U.S. Keyboard-Layout ('KCHR') ResourceStandard Sorting RoutinesDStandard sorting order (for Standard Roman character set)(continued))Diacritical Stripping and Case Conversion3U.S. International Resources and Keyboard Resources:International resources in U.S. system software(continued)5Keyboard resources in U.S. system software(continued)
  48. WorldScript IAbout WorldScript I-Shared Script Utilities and QuickDraw Patches6Script utilities supported by WorldScript I(continued),QuickDraw patches supported by WorldScript ITable-Based Script BehaviorContextual Formatting RoutinesFlexible Dispatching MethodInitialization SequenceHow Calls Are DispatchedJFigure A-2    Dispatch table entry for script utilities and QuickDraw patchesBFigure A-3    How calls are dispatched to the 1-byte script utilitiesCFigure A-4    How calls are dispatched to the 1-byte QuickDraw patchesSaving User Preferences-Replacing a Script Utility or QuickDraw PatchPatching Script Utilities5Classification of 1-byte script utilities by functionPatching QuickDraw Routines6Classification of 1-byte QuickDraw patches by function7Issues in Designing a Script Utility or QuickDraw PatchWorldScript IIAbout WorldScript IIShared Script Utilities7Script utilities supported by WorldScript II(continued)Table-Based Script BehaviorInitialization SequenceHow Calls Are DispatchedInternational Resources!About the International Resources$What the International Resources AreThe international resources#Script Codes and Resource ID Ranges4Resource ID ranges for each script system(continued)!Using the International Resources2International Configuration Resource (Type 'itlc')The ItlcRecord Data Type%Script-Sorting Resource (Type 'itlm')7Figure B-1    Format of the script-sorting resource headerRFigure B-2    Script, language, and region data tables in the script-sorting resourcePSorted scripts, languages, and regions from a script-sorting resource(continued),International Bundle Resource (Type ' itlb')The ItlbRecord Data TypeThe ItlbExtRecord Data Type%Numeric-Format Resource (Type 'itl0')+Constants for specifying numeric separatorsThe Intl0Rec Data Type'Long-Date-Format Resource (Type 'itl1')The Intl1Rec Data Type'Separator positions in long date format+Figure B-3    Examples of long date formattingThe Itl1ExtRec Data Type*String-Manipulation Resource (Type 'itl2')Resource Header<Figure B-4    Format of the string-manipulation resource headerThe 'itl2' Sorting HooksThe 'itl2' TablesScript Run Table Format=Figure B-5    Format of the script run table header (new format)'Figure B-6    Script run table state table3Figure B-7    Format of a script run table action code6Figure B-8    Format of the script run table return table!Supplying Custom Sorting Routines"Supplying Custom Word-Break TablesNBreakTable Format"Figure B-9    NBreakTable state table0Figure B-10    Format of an NBreakTable action code<Example of classes for an NBreakTable state table(continued);Example of states for an NBreakTable state table(continued)'How FindWordBreaks Uses the Break TableEFigure B-11    Forward operation of the state machine for word selectionTokens Resource (Type 'itl4')The NItl4Rec Data TypeThe Token Table%Figure B-12    Format of the token tableThe Extension-Fetching RoutineThe Token-String Copy RoutineThe Untoken TableThe Number Parts TableThe Whitespace Table*Figure B-13    Format of the whitespace table)Encoding/Rendering Resource (Type 'itl5')Resource Header Tables for 1-Byte Script SystemsScript Configuration Table4Figure B-14    Format of the script configuration tablePA script configuration table for a Hebrew encoding/rendering resource(continued)Line-Layout Metamorphosis Table"Line-Layout Glyph-Properties TableCharacter Expansion Table3Figure B-15    Format of the character expansion tableGlyph-to-Character Table2Figure B-16    Format of the glyph-to-character tableBreak-Table Directory/Figure B-17    Format of the break-table directoryScript Run TablesKashida Preferences TableFeature List TableReordering Table Tables for 2-Byte Script SystemsHSample encoding/rendering resource for a 2-byte script system(continued)Byte-Type TableCharacter-Type Table&Transliteration Resource (Type 'trsl')Resource Header9Figure B-18    Format of the transliteration resource headerRule-Based Format,Figure B-19    Format of a transliteration ruleTable-Based Format&Summary of the International ResourcesKeyboard ResourcesAbout KeyboardsThe keyboard types.Figure C-1    Apple Keyboard II (domestic layout)7Figure C-2    Apple Extended Keyboard II (domestic layout)-The keyboard modifier bits in an event recordAbout the Keyboard ResourcesWhat the Keyboard Resources AreThe keyboard resourcesKey Translation&Figure C-3    The key translation processUsing the Keyboard ResourcesKey-Map Resource (Type 'KMAP'))Figure C-4    Format of the key-map resourceApple Extended KeyboardAKey-map resource assignment of raw key codes to virtual key codes Reassigning Right-Hand Key Codes?Reassigning right key codes for Shift, Option, and Control keysOther Hardware DependenciesAADB and non-ADB virtual key codes for cursor keys and keypad keys'Virtual Key Codes for Non-ADB Keyboards?Virtual key codes for the international Macintosh Plus keyboard Key-Remap Resource (Type 'itlk')7Figure C-5    Format of an entry in the key-remap resource&Keyboard-Layout Resource (Type 'KCHR')Resource Format1Figure C-6    Format of the keyboard-layout resource:The KeyTranslate Function and the Keyboard-Layout Resource.Figure C-7    Inside the keyboard-layout resource*Special Uses for the KeyTranslate Function,Installing a Custom Keyboard-Layout Resource9Listing C-1    Loading a non-system keyboard-layout resource.Using KeyTranslate for Command-Key Equivalents;Listing C-2    Regenerating a character code with KeyTranslate3Keyboard Icon Family (Types 'kcs#', 'kcs4', 'kcs8')7Keyboard color icon types and standard icon equivalents Figure C-8    Sample keyboard icons$Keyboard-Swap Resource (Type 'KSWP'):Figure C-9    Format of entries in the keyboard-swap resource1Listing C-3    A hypothetical keyboard-swap resourceKey-Caps Resource (Type 'KCAP')Resource Format+Figure C-10    Format of the key-caps resource7Listing C-4    Sample key-caps resource data in Rez format?Figure C-11    Shape array and resulting region for the Return keyKey Caps Desk Accessory-Figure C-12    Key Caps display with key originsAFigure C-13    Key Caps display of dead keys with Option key pressedYFigure C-14    Key Caps display of completer keys after circumflex dead key has been pressed!Summary of the Keyboard Resources$Renamed and Relocated 
  49. Text RoutinesKRenamed, relocated, and obsolete text and international routines(continued)GlossaryIndex